package edu.cuit.avatar.接口.computer;

/**
 * 便利性抽象类:完成主板这一类相同的公共的实现
 * @author <a href="mailto:1020zhaodan@163.com">Adan</a>
 * @version 1.0
 * @date 2025/7/10 14:22
 */
public abstract class AbstractMainBoard implements MainBoard {
    private Cpu cpu;
    private Ram ram;
    private boolean power;
    @Override
    public void setCpu(Cpu cpu) {
        this.cpu = cpu;
    }

    @Override
    public Cpu getCpu() {
        return cpu;
    }

    @Override
    public void setRam(Ram ram) {
        this.ram = ram;
    }

    @Override
    public Ram getRam() {
        return ram;
    }

    @Override
    public boolean havePower() {
        return power;
    }

    @Override
    public void start() {
        this.power = true;
    }

    @Override
    public void shutdown() {
        this.power = false;
    }
}
